/**
 * XUX 文档自定义样式
 * 主题色: #1a1a1a
 */

/* 首页3D背景样式 */
.Layout[data-is-home="true"] {
  overflow-x: hidden;
}

.Layout[data-is-home="true"] .VPHome {
  padding: 0 !important;
}

.Layout[data-is-home="true"] .VPContent {
  padding: 0 !important;
}

/* 隐藏默认的hero区域 */
.Layout[data-is-home="true"] .VPHero {
  display: none !important;
}

 :root {
  /* 品牌色 - 使用 #1a1a1a 作为主色调 */
  --vp-c-brand-1: #1a1a1a;
  --vp-c-brand-2: #2a2a2a;
  --vp-c-brand-3: #3a3a3a;
  --vp-c-brand-soft: rgba(26, 26, 26, 0.14);
  
  /* 背景色 */
  --vp-c-bg: #ffffff;
  --vp-c-bg-alt: #f9fafb;
  --vp-c-bg-elv: #ffffff;
  --vp-c-bg-soft: #f9fafb;
  
  /* 文本色 */
  --vp-c-text-1: #1a1a1a;
  --vp-c-text-2: #4a4a4a;
  --vp-c-text-3: #6a6a6a;
  
  /* 边框色 */
  --vp-c-border: #e5e7eb;
  --vp-c-divider: #e5e7eb;
  --vp-c-gutter: #e5e7eb;
  
  /* 按钮色 */
  --vp-button-brand-bg: #1a1a1a;
  --vp-button-brand-text: #ffffff;
  --vp-button-brand-hover-bg: #2a2a2a;
  --vp-button-brand-hover-text: #ffffff;
  --vp-button-brand-active-bg: #0d0d0d;
  --vp-button-brand-active-text: #ffffff;
  
  /* 链接色 */
  --vp-c-brand: #1a1a1a;
  --vp-c-brand-dark: #0d0d0d;
  --vp-c-brand-darker: #000000;
  --vp-c-brand-light: #2a2a2a;
  --vp-c-brand-lighter: #3a3a3a;
  
  /* 代码块 */
  --vp-code-bg: #f6f8fa;
  --vp-code-color: #1a1a1a;
  
  /* 自定义组件库颜色变量 */
  --x-color-primary: #1a1a1a;
  --x-color-primary-light: #3a3a3a;
  --x-color-primary-dark: #0d0d0d;
}

/* 暗色模式 */
.dark {
  --vp-c-brand-1: #e5e5e5;
  --vp-c-brand-2: #cacaca;
  --vp-c-brand-3: #aaaaaa;
  --vp-c-brand-soft: rgba(229, 229, 229, 0.14);
  
  --vp-c-bg: #1a1a1a;
  --vp-c-bg-alt: #0d0d0d;
  --vp-c-bg-elv: #1a1a1a;
  --vp-c-bg-soft: #1a1a1a;
  
  --vp-c-text-1: #e5e5e5;
  --vp-c-text-2: #cacaca;
  --vp-c-text-3: #aaaaaa;
  
  --vp-c-border: #2a2a2a;
  --vp-c-divider: #2a2a2a;
  --vp-c-gutter: #2a2a2a;
  
  --vp-button-brand-bg: #e5e5e5;
  --vp-button-brand-text: #1a1a1a;
  --vp-button-brand-hover-bg: #ffffff;
  --vp-button-brand-hover-text: #1a1a1a;
  --vp-button-brand-active-bg: #cacaca;
  --vp-button-brand-active-text: #1a1a1a;
  
  --vp-code-bg: #0d0d0d;
  --vp-code-color: #e5e5e5;
  
  --x-color-primary: #e5e5e5;
  --x-color-primary-light: #ffffff;
  --x-color-primary-dark: #cacaca;
}

/* 自定义样式增强 */

/* Logo 样式优化 */
.VPNav .logo {
  height: 40px !important;
  max-height: 40px !important;
}

.VPNav .VPImage {
  height: 40px !important;
  max-height: 40px !important;
}

/* 首页 Hero Logo 样式 */
.VPHero .image-bg {
  max-width: 320px !important;
  max-height: 320px !important;
}

.VPHero .image-container {
  max-width: 320px !important;
}

.VPHero .VPImage {
  max-width: 100% !important;
  height: auto !important;
}

/* Hero 区域优化 */
.VPHero .name {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(
    90deg,
    #1a1a1a 0%,
    #ff6b6b 25%,
    #4ecdc4 50%,
    #45b7d1 75%,
    #1a1a1a 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.VPHero .name:hover {
  transform: scale(1.05);
  animation-play-state: paused;
}

.dark .VPHero .name {
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #ff6b6b 25%,
    #4ecdc4 50%,
    #45b7d1 75%,
    #ffffff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease-in-out infinite;
}

.VPHero .text {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dark .VPHero .text {
  background: linear-gradient(135deg, #ffffff 0%, #e5e5e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 特性卡片优化 */
.VPFeature {
  border: 1px solid var(--vp-c-border);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  min-width: 320px; /* 固定卡片最小宽度，避免跳动 */
  max-width: 320px; /* 保持所有卡片一致宽度，保证无缝 */
  flex-shrink: 0;
}

.VPFeature:hover {

  box-shadow: 0 12px 32px rgba(26, 26, 26, 0.12);
  transform: translateY(-4px) scale(1.02);
}

.dark .VPFeature:hover {
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.08);
}

/* 跑马灯双行容器 */
.VPHome .VPFeatures {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  padding: 40px 0;
}

/* 跑马灯行 */
.marquee-row {
  display: flex;
  gap: 20px;
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
}

/* 跑马灯动画容器 */
.marquee-container {
  display: flex;
  gap: 20px;
  width: max-content;
  will-change: transform;
  transform: translate3d(0,0,0);
  backface-visibility: hidden;
}

/* 第一行向左 - 慢速滚动 */
.marquee-row:nth-child(1) .marquee-container {
  animation: marqueeLeft 120s linear infinite;
}

/* 第二行向右 - 慢速滚动 */
.marquee-row:nth-child(2) .marquee-container {
  animation: marqueeRight 120s linear infinite;
}

/* 向左滚动动画 - 因为复制了3次，所以移动1/3 */
@keyframes marqueeLeft {
  0% {
    transform: translate3d(0,0,0);
  }
  100% {
    transform: translate3d(-25%,0,0);
  }
}

/* 向右滚动动画 - 因为复制了3次，所以移动1/3 */
@keyframes marqueeRight {
  0% {
    transform: translate3d(-25%,0,0);
  }
  100% {
    transform: translate3d(0,0,0);
  }
}

.marquee-container:hover {
  animation-play-state: paused;
}

/* 代码块优化 */
div[class*='language-'] {
  border-radius: 8px;
  margin: 16px 0;
  max-width: 100%;
  overflow-x: auto;
}

div[class*='language-'] code {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.7;
}

div[class*='language-'] pre {
  max-width: 100%;
  overflow-x: auto;
}

/* VitePress demo block 代码块优化 */
.vp-demo,
.demoblock-custom,
[class*="demo"] div[class*='language-'] {
  max-width: 100%;
}

.vp-demo pre,
.demoblock-custom pre {
  max-width: 100%;
  overflow-x: auto;
}

/* 表格优化 */
table {
  display: block;
  border-collapse: collapse;
  margin: 20px 0;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--vp-c-border);
}

th {
  background-color: var(--vp-c-bg-soft);
  font-weight: 600;
  text-align: left;
}

th, td {
  border: 1px solid var(--vp-c-border);
  padding: 12px 16px;
}

tr:hover {
  background-color: var(--vp-c-bg-soft);
}

/* 组件示例容器 */
.demo-container {
  border: 1px solid var(--vp-c-border);
  border-radius: 8px;
  padding: 24px;
  margin: 16px 0;
  background-color: var(--vp-c-bg-soft);
}

/* 徽章优化 */
.vp-badge {
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
}

/* 侧边栏徽章样式基础 */
.sidebar-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
  vertical-align: middle;
  line-height: 1.2;
}

/* 更新徽章 */
.sidebar-badge.update {
  background-color: rgba(74, 144, 226, 0.1) !important;
  color: #4A90E2 !important;
}

/* 新增徽章 */
.sidebar-badge.new {
  background-color: rgba(52, 199, 89, 0.1) !important;
  color: #34C759 !important;
}

/* 暗色模式下的更新徽章 */
.dark .sidebar-badge.update {
  background-color: rgba(74, 144, 226, 0.2) !important;
  color: #6FA8DC !important;
}

/* 暗色模式下的新增徽章 */
.dark .sidebar-badge.new {
  background-color: rgba(52, 199, 89, 0.2) !important;
  color: #52D869 !important;
}

/* VitePress 默认徽章样式（兼容） */
.VPSidebarItem .VPBadge.info {
  background-color: rgba(74, 144, 226, 0.1) !important;
  color: #4A90E2 !important;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
  vertical-align: middle;
  border: none;
}

.VPSidebarItem .VPBadge.tip {
  background-color: rgba(52, 199, 89, 0.1) !important;
  color: #34C759 !important;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
  vertical-align: middle;
  border: none;
}

.dark .VPSidebarItem .VPBadge.info {
  background-color: rgba(74, 144, 226, 0.2) !important;
  color: #6FA8DC !important;
}

.dark .VPSidebarItem .VPBadge.tip {
  background-color: rgba(52, 199, 89, 0.2) !important;
  color: #52D869 !important;
}

/* 侧边栏优化 */
.VPSidebar {
  padding-top: 24px;
}

.VPSidebarItem.is-active .text {
  color: var(--vp-c-brand-1);
  font-weight: 600;
}

/* 导航栏优化 */
.VPNavBar {
  border-bottom: 1px solid var(--vp-c-border);
  backdrop-filter: blur(8px);
}

/* 文档内容优化 */
.vp-doc h1 {
  border-bottom: 2px solid var(--vp-c-brand-1);
  padding-bottom: 16px;
  margin-top: 24px;
}

.vp-doc h2 {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--vp-c-divider);
}

.vp-doc a {
  color: var(--vp-c-brand-1);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.vp-doc a:hover {
  color: var(--vp-c-brand-2);
  text-decoration: underline;
}

/* 按钮优化 */
.VPButton {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.VPButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 26, 26, 0.15);
}

.dark .VPButton:hover {
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* 搜索框优化 */
.VPNavBarSearch {
  border-radius: 8px;
}

/* 页脚优化 */
.VPFooter {
  border-top: 1px solid var(--vp-c-border);
  margin-top: 64px;
  padding-top: 32px;
}

/* 滚动条优化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--vp-c-bg-soft);
}

::-webkit-scrollbar-thumb {
  background: var(--vp-c-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--vp-c-brand-1);
}

/* 首页网格背景 */
.VPHome {
  position: relative;
  overflow: hidden;
}

.VPHome::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  --color: rgba(114, 114, 114, 0.14);
  background-color: transparent;
  background-image: 
    linear-gradient(0deg, transparent 24%, var(--color) 25%, var(--color) 26%, transparent 27%, transparent 74%, var(--color) 75%, var(--color) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, var(--color) 25%, var(--color) 26%, transparent 27%, transparent 74%, var(--color) 75%, var(--color) 76%, transparent 77%, transparent);
  background-size: 55px 55px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  animation: gridBreathing 8s ease-in-out infinite;
}

.dark .VPHome::before {
  --color: rgba(114, 114, 114, 0.3);
  background-color: transparent;
  opacity: 0.3;
}

/* 网格背景呼吸动画 */
@keyframes gridBreathing {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.01);
  }
}

/* 暗色模式的呼吸动画 */
.dark .VPHome::before {
  animation: gridBreathingDark 8s ease-in-out infinite;
}

@keyframes gridBreathingDark {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(1.01);
  }
}


/* 确保内容在背景之上 */
.VPHome .VPHero,
.VPHome .VPFeatures {
  position: relative;
  z-index: 1;
}

/* Hero 区域增强动画 */
.VPHero {
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo 旋转动画 */
.VPHero .VPImage {
  animation: float 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.VPHero .VPImage:hover {
  animation-play-state: paused;
  transform: scale(1.05) rotate(5deg);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* 特性卡片效果 */
.VPFeature {
  position: relative;
}

/* 悬停时的渐变背景 */
.VPFeature::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, transparent 0%, rgba(59, 130, 246, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.VPFeature:hover::after {
  opacity: 1;
}

.dark .VPFeature:hover::after {
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.03) 100%);
}

/* 图标弹跳旋转效果 */
.VPFeature .icon {
  display: inline-block;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.VPFeature:hover .icon {
  transform: scale(1.15) rotate(8deg);
  animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
  0%, 100% {
    transform: scale(1.15) rotate(8deg);
  }
  50% {
    transform: scale(1.25) rotate(-8deg);
  }
}

/* 按钮发光效果 */
.VPButton.brand {
  position: relative;
  overflow: hidden;
}

.VPButton.brand::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: rotate(45deg);
  animation: buttonShine 3s infinite;
}

@keyframes buttonShine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 响应式优化 */
@media (max-width: 768px) {
  .demo-container {
    padding: 16px;
  }
  
  table {
    font-size: 14px;
  }
  
  th, td {
    padding: 8px 12px;
  }
  
  .VPNav .logo,
  .VPNav .VPImage {
    height: 32px !important;
    max-height: 32px !important;
  }
  
  .VPHero .image-bg,
  .VPHero .image-container {
    max-width: 240px !important;
    max-height: 240px !important;
  }
  
  /* 移动端减弱动画效果 */
  .VPHome::after {
    animation-duration: 10s;
    opacity: 0.5;
  }
  
  .VPHero .VPImage {
    animation: none;
  }
  
  .VPButton.brand::before {
    animation: none;
  }
  
  /* 移动端优化 */
  .VPFeature {
    min-width: 250px;
  }
  
  /* 移动端跑马灯速度 */
  .marquee-row:nth-child(1) .marquee-container {
    animation-duration: 80s;
  }
  
  .marquee-row:nth-child(2) .marquee-container {
    animation-duration: 80s;
  }
  
  /* 移动端流光速度 */
  .VPHome::after {
    animation-duration: 10s;
  }
}



/* 让布局占满宽度 */
:root {
  /* 可选：把全局最大宽度变量放大或直接全宽 */
  --vp-layout-max-width: 100%;
}

/* 移除文档内容区的 max-width 限制 */
.VPDoc .container {
  max-width: none !important;
}

/* 确保内容容器正确布局 */
.VPDoc .content-container {
  max-width: none !important;
}

/* 内容区域占据剩余空间 */
.VPDoc .content {
  max-width: none !important;
  flex: 1;
}

/**
 * XUX 文档自定义样式
 */

/* ==================== 导航栏对齐优化 ==================== */

/* 导航栏与侧边栏对齐，去除左右空隙 */
.VPNav .container {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.VPNavBar {
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* ==================== 内容区域居中优化 ==================== */

/* 文档容器 - 在左右侧边栏之间居中 */
/* .VPDoc .content-container {
  justify-content: center;
  align-items: flex-start;
} */

/* 文档内容 - 让中间内容占据所有可用空间 */
.vp-doc {
  max-width: 100% !important;
  width: 100%;
  padding: 32px 48px !important;
}

/* 确保文档容器正确定位，不与侧边栏重叠 */
.VPDoc {
  position: relative;
}

.VPDoc .content {
  position: relative;
  z-index: 1;
}

.VPSidebar {
  position: relative;
  z-index: 0;
}

@media (max-width: 1440px) {
  .vp-doc {
    padding: 32px 40px !important;
  }
}

@media (max-width: 1200px) {
  .vp-doc {
    padding: 24px 32px !important;
  }
}

@media (max-width: 960px) {
  .vp-doc {
    padding: 24px 24px !important;
  }
}

@media (max-width: 768px) {
  .vp-doc {
    padding: 20px 16px !important;
  }
}


/* ==================== 左侧导航栏优化 ==================== */

/* 左侧导航链接基础样式 */
.VPSidebarItem > .item > .link {
  padding-left: 12px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  padding-right: 12px !important;
  transition: all 0.3s ease;
}

/* 左侧导航激活状态 - 使用浅蓝色背景 */
.VPSidebarItem.is-active > .item > .link {
  background-color: rgba(74, 144, 226, 0.08) !important;
  color: #1C1C1E !important;
  border-radius: 6px;
  font-weight: 600;
  padding-left: 16px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  padding-right: 12px !important;
  margin-left: 4px;
  transition: all 0.3s ease;
}

/* 左侧导航激活状态（亮色主题） */
.VPSidebarItem.is-active > .item > .link .text {
  color: #1C1C1E !important;
}

/* 左侧导航激活状态图标 */
.VPSidebarItem.is-active > .item > .link .VPLink {
  color: #ffffff !important;
}

/* 左侧导航悬停效果 - 更浅的蓝色 */
.VPSidebarItem:not(.is-active) > .item > .link:hover {
  background-color: rgba(74, 144, 226, 0.04);
  border-radius: 6px;
  color: #1a1a1a !important;
  padding-left: 16px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  padding-right: 12px !important;
  margin-left: 4px;
  transition: all 0.2s ease;
}

/* 左侧导航分组标题 */
.VPSidebarItem.level-0 > .item {
  padding-top: 8px;
  margin-top: 12px;
}

.VPSidebarItem.level-0 > .item > .link .text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* 暗色模式下的左侧导航 - 使用浅蓝色背景 */
.dark .VPSidebarItem.is-active > .item > .link {
  background-color: rgba(74, 144, 226, 0.15) !important;
  color: #ffffff !important;
}

.dark .VPSidebarItem.is-active > .item > .link .text {
  color: #ffffff !important;
}

.dark .VPSidebarItem:not(.is-active) > .item > .link:hover {
  background-color: rgba(74, 144, 226, 0.08);
}

/* ==================== 右侧锚点导航优化 ==================== */

/* 右侧大纲容器 */
.VPDocAside {
  padding-left: 24px !important;
  padding-right: 24px !important;
}

.VPDocAsideOutline {
  position: sticky;
  top: 80px;
}

/* 大纲标题 */
.VPDocAsideOutline .outline-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--vp-c-text-1);
  margin-bottom: 12px;
  padding-left: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* 锚点链接 */
.VPDocOutlineItem {
  transition: all 0.2s ease;
}

.VPDocOutlineItem.root {
  padding-left: 12px;
}

.VPDocOutlineItem.nested {
  padding-left: 24px;
}

.VPDocOutlineItem a {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--vp-c-text-2);
  border-left: 2px solid transparent;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.VPDocOutlineItem a:hover {
  color: var(--vp-c-brand-1);
  background-color: var(--vp-c-bg-soft);
  border-left-color: var(--vp-c-brand-1);
  transform: translateX(2px);
}

/* 激活的锚点 - 使用浅蓝色背景 */
.VPDocOutlineItem.active a {
  color: #1C1C1E !important;
  background-color: rgba(74, 144, 226, 0.08) !important;
  border-left-color: #4A90E2;
  font-weight: 600;
}

.dark .VPDocOutlineItem.active a {
  color: #ffffff !important;
  background-color: rgba(74, 144, 226, 0.15) !important;
  border-left-color: #4A90E2;
}

/* 响应式 */
@media (max-width: 1440px) {
  .VPDocAside {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

@media (max-width: 1280px) {
  .VPDocAside {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}



/* ==================== 底部分页导航优化 ==================== */

/* 分页导航容器 */
.VPDocFooter {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--vp-c-divider);
}

/* 分页导航布局 */
.VPDocFooter .pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  max-width: 100%;
}

/* 上一页/下一页链接 */
.VPDocFooter .pager-link {
  flex: 0 1 auto;
  max-width: 280px;
  padding: 16px 20px;
  border: 1px solid var(--vp-c-divider);
  border-radius: 8px;
  background: var(--vp-c-bg);
  transition: all 0.3s ease;
  text-decoration: none;
}

.VPDocFooter .pager-link:hover {
  border-color: var(--vp-c-brand-1);
  background: var(--vp-c-bg-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 链接文字样式 */
.VPDocFooter .pager-link .desc {
  font-size: 13px;
  color: var(--vp-c-text-2);
  margin-bottom: 4px;
}

.VPDocFooter .pager-link .title {
  font-size: 15px;
  font-weight: 600;
  color: var(--vp-c-text-1);
  line-height: 1.5;
}

/* 响应式 */
@media (max-width: 768px) {
  .VPDocFooter .pager {
    flex-direction: column;
    gap: 12px;
  }
  
  .VPDocFooter .pager-link {
    max-width: 100%;
    width: 100%;
  }
}

/* ==================== 暗色模式 ==================== */

.dark .datetime-panel,
.dark .datetime-panel.panel-top,
.dark .datetime-panel.panel-bottom,
.dark .datetime-header,
.dark .datetime-mode-switch,
.dark .datetime-date-picker,
.dark .datetime-time-picker,
.dark .x-dropdown__menu,
.dark .x-search__results,
  .dark .x-search__result-item {
  background: #1a1a1a !important;
  background-color: #1a1a1a !important;
  border-color: #333 !important;
}

/* ==================== 贡献者区域样式 ==================== */

.contributors {
  display: flex;
  gap: 24px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.contributor-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.contributor-item a:hover {
  transform: translateY(-2px);
}

.contributor-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--vp-c-border);
  transition: border-color 0.2s ease;
  object-fit: cover;
}

.contributor-item a:hover .contributor-avatar {
  border-color: var(--vp-c-brand-1);
}

.contributor-name {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--vp-c-text-2);
  transition: color 0.2s ease;
}

.contributor-item a:hover .contributor-name {
  color: var(--vp-c-brand-1);
}

@media (max-width: 768px) {
  .contributors {
    gap: 16px;
  }
  
  .contributor-avatar {
    width: 60px;
    height: 60px;
  }
  
  .contributor-name {
    font-size: 12px;
  }
}

/* ==================== Demo 区域样式 ==================== */

.demo-item {
  max-width: 400px;
  margin-bottom: 16px;
}

.demo-item h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--vp-c-text-1);
}

.demo-result {
  margin-top: 12px;
  padding: 12px;
  background-color: var(--vp-c-bg-soft);
  border-radius: 4px;
  font-size: 14px;
  color: var(--vp-c-text-2);
  border: 1px solid var(--vp-c-border);
}

.demo-result p {
  margin: 4px 0;
}

/* 防止内容溢出 */
.vp-doc img {
  max-width: 100%;
  height: auto;
}

.vp-doc pre code {
  display: block;
  max-width: 100%;
}

/* Grid 布局响应式优化 */
@media (max-width: 1024px) {
  [style*="display: grid"][style*="grid-template-columns: repeat(2"] {
    grid-template-columns: 1fr !important;
  }
}